function dlTabsLabelButton(labelName, action)
{
	this.name = labelName;
	this.action = action;
	this.state = false;
	
	this.label = document.getElementById(labelName + "Label");
	this.label.setAttribute("onmousedown", "dlTabsTab.page." + this.name + ".mouseDown();");
	this.label.setAttribute("onmouseup", "dlTabsTab.page." + this.name + ".mouseUp();");
	this.label.setAttribute("onmouseout", "dlTabsTab.page." + this.name + ".mouseExit();");
	
	this.BG = document.getElementById(labelName + "BG");
	this.leftEnd = document.getElementById(labelName + "LeftEnd");
	this.rightEnd = document.getElementById(labelName + "RightEnd");
	
	this.refresh = function()
	{
		if(!dlTabsTab.download)
			return;
		if(this.state)
		{
			this.label.setAttribute("class", "dlTabs_font dlTabs_label dlTabs_label_on");
			this.BG.setAttribute("src", "chrome://downloadtabs/skin/label_on.png");
			this.leftEnd.setAttribute("src", "chrome://downloadtabs/skin/label_leftEnd_on.png");
			this.rightEnd.setAttribute("src", "chrome://downloadtabs/skin/label_rightEnd_on.png");
		}
		else
		{
			this.label.setAttribute("class", "dlTabs_font dlTabs_label dlTabs_label_off");
			this.BG.setAttribute("src", "chrome://downloadtabs/skin/label_off.png");
			this.leftEnd.setAttribute("src", "chrome://downloadtabs/skin/label_leftEnd_off.png");
			this.rightEnd.setAttribute("src", "chrome://downloadtabs/skin/label_rightEnd_off.png");
		}
	}
	
	this.mouseDown = function()
	{
		this.state = true;
		dlTabsTab.refresh();
	}
	
	this.mouseUp = function()
	{
		if(this.state)
		{
			this.state = false; 
			this.action();
		}
	}
	
	this.mouseExit = function()
	{
		if(this.state)
		{
			this.state = false;
			dlTabsTab.refresh();
		}
	}
	
	// No need for a enable function so far...
	this.disable = function()
	{
		this.label.removeAttribute("onmousedown");
		this.label.removeAttribute("onmouseup");
		this.label.removeAttribute("onmouseout");
		this.label.style.setProperty("color", "#AEAEAE", "important");
		this.BG.setAttribute("src", "chrome://downloadtabs/skin/label_disabled.png");
		this.leftEnd.setAttribute("src", "chrome://downloadtabs/skin/label_leftEnd_disabled.png");
		this.rightEnd.setAttribute("src", "chrome://downloadtabs/skin/label_rightEnd_disabled.png");
	}
	
	// If there is no download, disable this label
	if(!dlTabsTab.download)
		this.disable();
}